package com.flyox.game.militarychess.client.services.data;

import java.io.Serializable;
import java.util.Hashtable;

import com.flyox.game.militarychess.bean.ChessDesk;
import com.flyox.game.militarychess.bean.ChessMan;
import com.flyox.game.militarychess.bean.Player;

public class ClientInfo implements Serializable {

	private static final long serialVersionUID = -3124718536534621696L;
	private static String serverIP="";
	private static int serverPort;
	
	private static Player player;
	private static Hashtable<Integer, ChessDesk> desks = new Hashtable<Integer, ChessDesk>();
	private static ChessMan[][] layout=new ChessMan[13][20];//玩家所能知道的全局布局
	private static ChessDesk chessDesk;
	
	public ChessDesk getChessDesk() {
		return chessDesk;
	}
	public void setChessDesk(ChessDesk chessDesk) {
		ClientInfo.chessDesk = chessDesk;
	}
	public Player getPlayer() {
		return player;
	}
	public void setPlayer(Player player) {
		ClientInfo.player = player;
	}
	public Hashtable<Integer, ChessDesk> getDesks() {
		return desks;
	}
	public void setDesks(Hashtable<Integer, ChessDesk> desks) {
		ClientInfo.desks = desks;
	}
	public String getServerIP() {
		return serverIP;
	}
	public void setServerIP(String serverIP) {
		ClientInfo.serverIP = serverIP;
	}
	public int getServerPort() {
		return serverPort;
	}
	public void setServerPort(int serverPort) {
		ClientInfo.serverPort = serverPort;
	}

	public ChessMan[][] getLayout() {
		return layout;
	}
	public void setLayout(ChessMan[][] layout) {
		ClientInfo.layout = layout;
	}
//	public void showInfos(){
//		Enumeration<ChessDesk> e2=desks.elements();
//		ChessDesk c=null;
//		while(e2.hasMoreElements()){
//			c=e2.nextElement();
//			System.out.print(" deskNum:"+c.getDeskNum()+" deskState:"+c.getDeskStates());
//			System.out.println();
//			Hashtable<SEAT_NAME, ChessSeat> seats=c.getSeats();
//			System.out.print(" state s1:"+seats.get(SEAT_NAME.S1).getSeatState());
//			System.out.print(" state s2:"+seats.get(SEAT_NAME.S2).getSeatState());
//			System.out.print(" state s3:"+seats.get(SEAT_NAME.S3).getSeatState());
//			System.out.print(" state s4:"+seats.get(SEAT_NAME.S4).getSeatState());
//			System.out.print(" state s5:"+seats.get(SEAT_NAME.S5).getSeatState());
//			System.out.print(" state s6:"+seats.get(SEAT_NAME.S6).getSeatState());
//			System.out.print(" state s7:"+seats.get(SEAT_NAME.S7).getSeatState());
//			System.out.println(" state s8:"+seats.get(SEAT_NAME.S8).getSeatState());
//		}
//		System.out.println();
//	}

}
